import { IData } from '../api/registration/content/query.api';
import Table from '../../components/table';

export default function List({ data }: { data: IData[]; }) {
	return <>
		<Table
			idfieldname='student_id'
			data={data}
			render={(v) => {
				const id = v.student_id;
				const url = `/registration/registration1?id=${id}`;
				return <div className='s'>
					<a href={url} >
						<img src='/icons/sh.svg' />
						<span>审核</span>
					</a>
				</div>;

			}}
		>
			<Table.Column title='姓名' key='name' dataIndex='name' align='left' />
			<Table.Column title='性别' key='gender' dataIndex='gender' align='left' />
			<Table.Column title='学号' key='student_id' dataIndex='student_id' align='left' />
			<Table.Column title='学院' key='college' dataIndex='college' align='left' />
			<Table.Column title='专业' key='originalmajor' dataIndex='originalmajor' align='left' />
			<Table.Column title='班级' key='originalclass' dataIndex='originalclass' align='left' />
			<Table.Column title='政治面貌' key='politicaloutlook' dataIndex='politicaloutlook' align='left' />
			<Table.Column title='联系电话' key='telephone' dataIndex='telephone' align='left' />
			<Table.Column title='意向专业' key='intendedmajor' dataIndex='intendedmajor' align='left' />
		</Table>
		<style jsx>{`
.s{
display: flex;
justify-content: center;
}
`}</style>
	</>;
}
